<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>项目时长</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/Top.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/buttons.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/datagrid-detailview.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/util/jquery.cookie.js"></script>
    <style type="text/css">
        .table{
            border: 1px solid #FFE7BA;
        }
        .table tr {
            border: 1px solid #FFE7BA;
        }
        .table tr td {
            border: 1px solid #FFE7BA;
        }
    </style>

    <script type="text/javascript">
        $(function () {
            getXmdurTj();
            queryXmdurList();
        });

        function getXmdurTj() {
            $.ajax({
                type:'post',
                url:'/jxcsxm/operate/getXmdurTj.do',
                data:'gydw='+parent.obj.opt_name+"&startTime="+parent.startTime+"&endTime="+parent.endTime,
                dataType:'json',
                success:function(msg){
                    $("#num").html(msg.num);
                    $("#onLineNum").html(msg.onLineNum);
                }
            });
        }

        function queryXmdurList() {
            $("#zjxdgrid").datagrid({
                url:'/jxcsxm/operate/getDurationList.do',
                striped:true,
                pagination:true,
                rownumbers:true,
                pageNumber:1,
                pageSize:15,
                pageList: [15, 30, 45, 60, 75],
                checkOnSelect:true,
                loadMsg: "数据正在加载中...",
                height:$(window).height()-60,
               /* width:$('#searchField').width()+2,*/
                queryParams: {
                    gydw: parent.obj.opt_name,
                    startTime: parent.startTime,
                    endTime: parent.endTime
                },
                columns: [[
                    {field:'truename',title:'用户名',width:150,align:'center'},
                    {field:'totaltime',title:'在线时长(分钟)',width:120,align:'center'},
                    {field:'time',title:'创建时间',width:140,align:'center'}
                ]]
            });
        }
    </script>
</head>
<body>
    <form id="xminfo">
        <table class='table' style="width: 97%;margin-left:5px;margin-right:5px; background-color: #FFE7BA; font-size: 12px" border="0" cellpadding="6" cellspacing="1">
            <div id='zjxd'>
                <tr>
                    <td colspan="4" style="border-style: none none solid none; border-width: 1px; border-color: #C0C0C0; color: #55BEEE; font-weight:bold;  font-size: small; text-align: left; background-color: #FFEFD5; width: 15%; padding-left: 10px;height: 30px;">
                        总共【<span id="num" style="color: Red; font-weight: bold;">0</span>】项目,
                        总在线时长【<span id="onLineNum" style="color: Red; font-weight: bold;">0</span>】分钟。
                    </td>
                </tr>

                <tr>
                    <td colspan="4">
                        <table id="zjxdgrid">
                        </table>
                    </td>
                </tr>
            </div>
        </table>
</form>
</body>
</html>
